﻿@{
    Layout = null;
}
@using CNKI.TPI.Web.Search.Model;
@using CNKI.TPI.Web.Base
<script>
    function searchNav() {
        var searchname = $("#searchname").val();
        $("#hidename").val(searchname);
        searchNavData()
    }
    $(function () {
        searchNav();
    })
    function searchNavData() {
        $.ajax({
            type: "GET",
            url: timestamp("@Html.Raw(Url.Action("CategoryNavSearch", "Admin_Topic"))"),
            data: { "navname": $('#hidename').val(), "pageIndexNow": $('#pageIndexNow').val() },
            beforeSend: function () { $("#loading").show(); },
            success: function (msg) {
                $("#navList").html("");
                $("#navList").html(msg);
                $("#loading").hide();
            },
            error: function (e)
            { $("#loading").hide(); }
        })
    }
    //点击分页
    function searchPageNew(n) {
        $('#pageIndexNow').val(n);
        searchNav();
    }
    $(document).keydown(function (event) {
        if (event.keyCode == 13) {
            if ($(".navform").css("display") == "none") {
                searchNav();
            }
            else {
                return false;
            }
        }
    });
</script>
<div class="wrapR-h" style="padding-top: 20px; padding-bottom: 20px">
    <input id="FlageID" type="hidden" />
    <input type="hidden" id="pageIndexNow" name="pageIndexNow" value="1" />
    <div class="form form-h">
        <div class="f-gp">
            <div class="f-lb">
                <label class="f-label">导航名称：</label>
            </div>
            <div class="f-ct f-ml">
                <input type="text" class="f-text span4" id="searchname" maxlength="255">
                <input type="hidden" class="f-text span4" id="hidename">
                <a class="btn btn-submit btn-warn-f" onclick="searchNav()">检索</a>
            </div>
        </div>

    </div>
</div>
<div class="wrapR-c">
    <div id="navList">
    </div>
</div>




